einfo = function(baseurl)
   function(database=NULL) {
      if (is.null(database)) {
         object = eutil(baseurl, 'einfo', '')
         object$databases = xpathSApply(object$response, '//DbList/DbName', xmlValue) }
      else {
         object = eutil(baseurl, 'einfo', sprintf('db=%s', database))
         response = object$response
         features = c(
            list(
               fields=as.data.frame(stringsAsFactors=FALSE, split(
                  xpathSApply(response, '//FieldList/Field/*', xmlValue),
                  xpathSApply(response, '//FieldList/Field[position()=1]/*', xmlName))),
               links=as.data.frame(stringsAsFactors=FALSE, split(
                  xpathSApply(response, '//LinkList/Link/*', xmlValue),
                  xpathSApply(response, '//LinkList/Link[position()=1]/*', xmlName)))),
            lapply(
               list(id='DbName', name='MenuName', description='Description', count='Count', update='LastUpdate'),
               function(name) 
                  xpathSApply(response, sprintf('/*/*/%s', name), xmlValue)))
         object[names(features)] = features }
      return (object) }
